package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Role;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    public List<Role> selectAll();
    public Role selectByPrimaryKey(Long id);

    public void insert(Role role);
    public void deleteByPrimaryKey(Long id);
    public void updateByPrimaryKey(Role role);

    public int selectForCount(QueryObject qo);
    public List<Role> selectForList(QueryObject qo);

    //中间表操作
    public abstract void insertRelation(@Param("rid") Long rid, @Param("pid") Long pid);
    //通过id删除关系表信息
    public abstract void deleteRelation(Long id);


}
